﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using MemberMgr.Data.BusinessObjects;

namespace MemberMgr.Website.Common
{
    public class TabPageBase : PageBase
    {
        protected override void Page_Init(object sender, EventArgs e)
        {
            tUser userInfo = Session[CommonConst.SESSION_USERINFO] as tUser;

            //Login Check
            if (userInfo == null)
            {
                this.Session.Abandon();
                //this.ClientScript.RegisterStartupScript(this.GetType(),"relogin", string.Format("<script>window.top.location='{0}'</script>",Server.MapPath("~/Login.aspx")));
                this.Response.Clear();
                this.Response.Write(string.Format("<script type='text/javascript'>window.top.location='{0}'</script>", this.Request.ApplicationPath + "Login.aspx"));
                this.Response.Flush();
                this.Response.Close();
                return;
            }
        }
    }
}
